package us.mooresr.geartrack.server.guice;

import com.gwtplatform.dispatch.server.guice.HandlerModule;

import us.mooresr.geartrack.shared.action.CheckInItemAction;
import us.mooresr.geartrack.shared.action.CheckOutItemAction;
import us.mooresr.geartrack.shared.action.GetAllAvailableItemsAction;
import us.mooresr.geartrack.shared.action.GetAllCheckedOutItemsAction;
import us.mooresr.geartrack.shared.action.GetAllItemTypesAction;
import us.mooresr.geartrack.shared.action.GetAllLoansAction;
import us.mooresr.geartrack.shared.action.GetAllLocationsAction;
import us.mooresr.geartrack.shared.action.PutItem;
import us.mooresr.geartrack.shared.action.PutItemAction;
import us.mooresr.geartrack.shared.action.PutItemTypeAction;
import us.mooresr.geartrack.shared.action.PutLoanAction;
import us.mooresr.geartrack.shared.action.PutLocationAction;
import us.mooresr.geartrack.shared.action.PutPersonAction;
import us.mooresr.geartrack.shared.action.DeleteItemAction;
import us.mooresr.geartrack.shared.action.DeleteItemTypeAction;
import us.mooresr.geartrack.shared.action.DeleteLoanAction;
import us.mooresr.geartrack.shared.action.DeleteLocationAction;
import us.mooresr.geartrack.shared.action.DeletePersonAction;
import us.mooresr.geartrack.shared.action.GetAllItemsAction;
import us.mooresr.geartrack.shared.action.GetAllPeopleAction;
import us.mooresr.geartrack.server.handler.CheckInItemActionHandler;
import us.mooresr.geartrack.server.handler.CheckOutItemActionHandler;
import us.mooresr.geartrack.server.handler.GetAllAvailableItemsActionHandler;
import us.mooresr.geartrack.server.handler.GetAllCheckedOutItemsActionHandler;
import us.mooresr.geartrack.server.handler.GetAllItemTypesActionHandler;
import us.mooresr.geartrack.server.handler.GetAllLoansActionHandler;
import us.mooresr.geartrack.server.handler.GetAllLocationsActionHandler;
import us.mooresr.geartrack.server.handler.PutItemTypeActionHandler;
import us.mooresr.geartrack.server.handler.PutLoanActionHandler;
import us.mooresr.geartrack.server.handler.PutLocationActionHandler;
import us.mooresr.geartrack.server.handler.PutPersonActionHandler;
import us.mooresr.geartrack.server.handler.PutItemActionHandler;
import us.mooresr.geartrack.server.handler.DeleteItemTypeActionHandler;
import us.mooresr.geartrack.server.handler.DeleteLoanActionHandler;
import us.mooresr.geartrack.server.handler.DeleteLocationActionHandler;
import us.mooresr.geartrack.server.handler.DeletePersonActionHandler;
import us.mooresr.geartrack.server.handler.GetAllPeopleActionHandler;
import us.mooresr.geartrack.shared.action.DeleteItem;
import us.mooresr.geartrack.server.handler.DeleteItemActionHandler;
import us.mooresr.geartrack.shared.action.GetAllItems;
import us.mooresr.geartrack.server.handler.GetAllItemsActionHandler;


public class ServerModule extends HandlerModule {

	@Override
	protected void configureHandlers() {

		// Item handlers
		bindHandler(PutItemAction.class, PutItemActionHandler.class);
		bindHandler(DeleteItemAction.class, DeleteItemActionHandler.class);
		bindHandler(GetAllItemsAction.class, GetAllItemsActionHandler.class);

		// Person handlers
		bindHandler(PutPersonAction.class, PutPersonActionHandler.class);
		bindHandler(DeletePersonAction.class, DeletePersonActionHandler.class);
		bindHandler(GetAllPeopleAction.class, GetAllPeopleActionHandler.class);
		
		// ItemType handlers
		bindHandler(PutItemTypeAction.class, PutItemTypeActionHandler.class);
		bindHandler(DeleteItemTypeAction.class, DeleteItemTypeActionHandler.class);
		bindHandler(GetAllItemTypesAction.class, GetAllItemTypesActionHandler.class);
		
		// Location handlers
		bindHandler(PutLocationAction.class, PutLocationActionHandler.class);
		bindHandler(DeleteLocationAction.class, DeleteLocationActionHandler.class);
		bindHandler(GetAllLocationsAction.class, GetAllLocationsActionHandler.class);
		
		// Loan handlers
		bindHandler(PutLoanAction.class, PutLoanActionHandler.class);
		bindHandler(DeleteLoanAction.class, DeleteLoanActionHandler.class);
		bindHandler(GetAllLoansAction.class, GetAllLoansActionHandler.class);
		bindHandler(GetAllAvailableItemsAction.class, GetAllAvailableItemsActionHandler.class);
		bindHandler(GetAllCheckedOutItemsAction.class, GetAllCheckedOutItemsActionHandler.class);
		bindHandler(CheckInItemAction.class, CheckInItemActionHandler.class);
		bindHandler(CheckOutItemAction.class, CheckOutItemActionHandler.class);
		
		
		
		
		
		
		
		
		
	}
}
